import CryptoJS from 'crypto-js';

//解密密钥
const secretKey = '78255596aa94566e581396bdd8ebbdb8';
//解密
export function decrypt(txt: string) {
    var key = CryptoJS.enc.Utf8.parse(secretKey);
    var decrypt = CryptoJS.AES.decrypt(txt, key, {
        mode: CryptoJS.mode.ECB,
        padding: CryptoJS.pad.Pkcs7
    });
    return CryptoJS.enc.Utf8.stringify(decrypt).toString();
}
